Skip to content

End to end eatery integration for ecosystem#116

Merged
04jono merged 8 commits intomainfrom
jonathan/generalize-ui
Feb 6, 2026
Merged

End to end eatery integration for ecosystem#116
04jono merged 8 commits intomainfrom
jonathan/generalize-ui

Conversation

@04jono
Copy link
Member

@04jono 04jono commented Nov 19, 2025

Overview

  • Added operating hours and parsing logic for eatery model
  • Added image loading over network functionality
  • Built all UI components for eateries in the ecosystem bottom sheet

Changes Made

  • Added events to eatery class and hours parsing logic
  • Created new components for sections in place details
  • Created component for displaying hours, displaying open/close depending on current hour

Test Coverage

  • Tested on Pixel 2 emulator

Next Steps (delete if not applicable)

  • Add animations between state changes
  • Add arrow to "View menu on Eatery" and deep linking functionality

Related PRs or Issues (delete if not applicable)

Screenshots (delete if not applicable)

Screen Recording
Screen_recording_20251119_003138.webm

@04jono 04jono requested a review from zachseidner1 November 19, 2025 05:38
Copy link

@caleb-bit caleb-bit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Most of my comments were very minor fixes/requests.

@04jono 04jono requested a review from caleb-bit December 1, 2025 04:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR wires end-to-end support for ecosystem eateries: fetching full eatery data (including events), computing operating hours/open status, loading images over the network, and presenting a detailed eatery UI in the ecosystem bottom sheet and detail sheet.

Changes:

  • Extend the Eatery model and networking to fetch events, parse operating hours into a week schedule, and compute open/closed status with user-facing strings.
  • Introduce Coil-based image loading plus new reusable UI components (rounded image cards, operating-hours lists, expandable sections, and loading indicators) for eateries and libraries.
  • Integrate eatery cards and an eatery detail sheet into the ecosystem bottom sheet, including “View Menu on Eatery”, “About” content, and favorites support.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
app/src/main/res/values/strings.xml Adds view_menu string used for the “View Menu on Eatery” action in the eatery detail sheet.
app/src/main/java/com/cornellappdev/transit/util/ecosystem/PlaceUtils.kt Adds Eatery.toPlace() mapper so eateries can be treated as generic Place instances for navigation/favorites.
app/src/main/java/com/cornellappdev/transit/util/TimeUtils.kt Adds DayOfWeek.toPascalCaseString() helper used to align enum day names with user-facing day strings.
app/src/main/java/com/cornellappdev/transit/util/PreviewConstants.kt Introduces sampleHours preview data for operating-hours-related composable previews.
app/src/main/java/com/cornellappdev/transit/util/ContentConstants.kt Adds temporary getAboutContent mapping to supply descriptive “About” text for specific eateries.
app/src/main/java/com/cornellappdev/transit/ui/viewmodels/OpenStatus.kt New OpenStatus data class representing whether a place is open and when its status will change.
app/src/main/java/com/cornellappdev/transit/ui/viewmodels/HomeViewModel.kt Adds operating-hours rotation, open/closed status calculation, and annotated-string formatting, and wires these into the EATERIES filter; also exposes a helper for UI (isOpenAnnotatedStringFromOperatingHours).
app/src/main/java/com/cornellappdev/transit/ui/theme/Style.kt Introduces cardSubtitle and heading3Semibold text styles used in new card and details UIs.
app/src/main/java/com/cornellappdev/transit/ui/components/home/RoundedImagePlaceCard.kt Refactors the card to use PlaceCardImage (network + placeholder) and display optional left/right annotated text plus favorites.
app/src/main/java/com/cornellappdev/transit/ui/components/home/PlaceCardImage.kt New composable that loads network images with Coil, falls back to a drawable, and applies rounded-corner clipping/background.
app/src/main/java/com/cornellappdev/transit/ui/components/home/OperatingHoursList.kt New composable displaying a full week of DayOperatingHours, highlighting the first (typically “today”) row.
app/src/main/java/com/cornellappdev/transit/ui/components/home/ExpandableOperatingHoursList.kt New composable showing a compact open/closed status row that can expand to the full OperatingHoursList.
app/src/main/java/com/cornellappdev/transit/ui/components/home/EcosystemBottomSheetContent.kt Wires the EATERIES filter to fetch eateries, show a spinner while loading, render RoundedImagePlaceCards with open/closed status, and hook into details/favorites.
app/src/main/java/com/cornellappdev/transit/ui/components/home/EateryDetailsContent.kt New eatery detail sheet body: hero image, header with open status + favorite star, “About” text via getAboutContent, view-menu call-to-action, location row, and expandable operating hours.
app/src/main/java/com/cornellappdev/transit/ui/components/home/DetailedPlaceSheetContent.kt Replaces the Eatery TODO with EateryDetailsContent and enables “Navigate” for eateries via toPlace().
app/src/main/java/com/cornellappdev/transit/ui/components/home/DetailedPlaceHeaderSection.kt New header section composable shared by detailed place views (title, subtitle, open-status text, and favorites star).
app/src/main/java/com/cornellappdev/transit/ui/components/home/CenteredSpinningIndicator.kt New composable for a centered CircularProgressIndicator used while eateries are loading.
app/src/main/java/com/cornellappdev/transit/networking/NetworkModule.kt Registers DateTimeAdapter with Moshi so eatery event times can deserialize to LocalDateTime.
app/src/main/java/com/cornellappdev/transit/networking/MoshiAdapters.kt Adds DateTimeAdapter to convert epoch second values to LocalDateTime (and back to a formatted string) alongside the existing LatLngAdapter.
app/src/main/java/com/cornellappdev/transit/networking/EateryNetworkApi.kt Updates the eatery endpoint from /eatery/simple to /eatery/ to retrieve full eatery data including events.
app/src/main/java/com/cornellappdev/transit/models/ecosystem/Eatery.kt Extends Eatery to include events, adds an Event model, and implements logic to aggregate events into per-day operating hours and sort them by a custom Sunday-first weekday order.
app/src/main/java/com/cornellappdev/transit/models/ecosystem/DayOperatingHours.kt Introduces DayOperatingHours data class representing a day-of-week label plus its list of operating-time strings.
app/src/main/java/com/cornellappdev/transit/TransitApplication.kt Configures a global Coil 3 ImageLoader (memory cache + crossfade) via SingletonImageLoader.Factory.
app/build.gradle.kts Adds Coil 3 compose/network dependencies and a shimmer dependency for image loading/visual effects.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@AndrewCheung360 AndrewCheung360 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@04jono 04jono merged commit 905f17e into main Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants